export function returnMessage(
  res,
  $message,
  prompt = true,
  statusNumber = 200
) {
  const {
    data,
    meta: { msg, status }
  } = res;
  if (status !== statusNumber) return $message.error(msg);
  if (prompt) {
    $message({
      message: msg,
      type: "success"
    });
  }
  return data;
}
